package com.example.detectivedemo.domain.product;

import com.example.detectivedemo.domain.generic.GenericEntity;

/**
 * 产品实体类
 * 演示通用框架的使用
 */
public class Product extends GenericEntity {
    private static final long serialVersionUID = 1L;
    
    private String name;
    private String description;
    private double price;
    private int stock;
    private String category;
    
    // 构造函数
    public Product() {
        super();
    }
    
    public Product(String name, String description, double price, int stock, String category) {
        super();
        this.name = name;
        this.description = description;
        this.price = price;
        this.stock = stock;
        this.category = category;
    }
    
    // Getter和Setter方法
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public double getPrice() {
        return price;
    }
    
    public void setPrice(double price) {
        this.price = price;
    }
    
    public int getStock() {
        return stock;
    }
    
    public void setStock(int stock) {
        this.stock = stock;
    }
    
    public String getCategory() {
        return category;
    }
    
    public void setCategory(String category) {
        this.category = category;
    }
    
    @Override
    public String toString() {
        return "Product{" +
                "id='" + getId() + '\'' +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", stock=" + stock +
                ", category='" + category + '\'' +
                '}';
    }
}